import os
import sys


base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'day06.settings')


import django
django.setup()

# 伪造，让 django 启动
from web import models
from utils.encrypt import md5

models.Customer.objects.filter(id=314).update(id=1)

for i in range(302):
    models.Customer.objects.create(
        username=f'Alter{i}',
        password=md5('123456'),
        mobile="13956610290",
        creator_id = 1,
        level_id=6,
    )
